<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车安全装备详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 200px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 200px;
  	}
  </style>
</head>

<body>
<div>
	<div style="padding: 50px;padding-top: 10px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailSafetyEquipment.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">主/副驾驶座安全气囊</label>
			     <div class="layui-input-inline">
			         <input type="text" name="lorddeputydirversseatairbag" id='lorddeputydirversseatairbag' placeholder="请输入主/副驾驶座安全气囊" value="${carDetailSafetyEquipment.lorddeputydirversseatairbag }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">前/后排侧气囊</label>
			     <div class="layui-input-inline">
			         <input type="text" name="frontandrearsideairbags" id='frontandrearsideairbags' placeholder="请输入前/后排侧气囊" value="${carDetailSafetyEquipment.frontandrearsideairbags }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">前/后排头部气囊(气帘)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="beforeandafftertheheadairbag" id='beforeandafftertheheadairbag' placeholder="请输入前/后排头部气囊(气帘)" value="${carDetailSafetyEquipment.beforeandafftertheheadairbag }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">膝部气囊</label>
			     <div class="layui-input-inline">
			         <input type="text" name="kneeairbag" id='kneeairbag' placeholder="请输入前/后排侧气囊" value="${carDetailSafetyEquipment.kneeairbag }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">胎压监测装置</label>
			     <div class="layui-input-inline">
			         <input type="text" name="pressuremonitoringdevice" id='pressuremonitoringdevice' placeholder="请输入胎压监测装置" value="${carDetailSafetyEquipment.pressuremonitoringdevice }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">零胎压继续行驶</label>
			     <div class="layui-input-inline">
			         <input type="text" name="zeropressurecontinuedtravel" id='zeropressurecontinuedtravel' placeholder="请输入零胎压继续行驶" value="${carDetailSafetyEquipment.zeropressurecontinuedtravel }" class="layui-input">
			     </div>
			     
			 </div>
			 
		 	 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">安全带未系提示</label>
			     <div class="layui-input-inline">
			         <input type="text" name="sagetybeltprompt" id='sagetybeltprompt' placeholder="请输入安全带未系提示" value="${carDetailSafetyEquipment.sagetybeltprompt }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">ISOFIX儿童座椅接口</label>
			     <div class="layui-input-inline">
			         <input type="text" name="childseatinterface" id='childseatinterface' placeholder="请输入ISOFIX儿童座椅接口" value="${carDetailSafetyEquipment.childseatinterface }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">发动机电子防盗</label>
			     <div class="layui-input-inline">
			         <input type="text" name="engineelectronicantitheft" id='engineelectronicantitheft' placeholder="请输入发动机电子防盗" value="${carDetailSafetyEquipment.engineelectronicantitheft }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">ISOFIX儿童座椅接口</label>
			     <div class="layui-input-inline">
			         <input type="text" name="controllock" id='controllock' placeholder="请输入车内中控锁" value="${carDetailSafetyEquipment.controllock }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">遥控钥匙</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rmeotekey" id='rmeotekey' placeholder="请输入遥控钥匙" value="${carDetailSafetyEquipment.rmeotekey }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">无钥匙启动系统</label>
			     <div class="layui-input-inline">
			         <input type="text" name="keylessstartsystem" id='keylessstartsystem' placeholder="请输入无钥匙启动系统" value="${carDetailSafetyEquipment.keylessstartsystem }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">无钥匙进入系统</label>
			     <div class="layui-input-inline">
			         <input type="text" name="keylessentrysystem" id='keylessentrysystem' placeholder="请输入无钥匙进入系统" value="${carDetailSafetyEquipment.keylessentrysystem }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailSafetyEquipment/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
